#pragma once
class TerrianMesh;
class CalRoadZCurve
{
public:
	CalRoadZCurve(TerrianMesh* pTerrain, vector<vector<PolyPnt>>& vRoadMiddleLine)
	{
		m_pTerrain = pTerrain;
		m_vRoadMiddleLine = vRoadMiddleLine;
	}
	void Cal(double dMaxDetalHeight = 10, double dMinCalDis=100, double dDetalHeight = 0);

	vector<vector<PolyPnt>> GetData()
	{
		return m_vRoadMiddleLine;
	}
protected:
	int CalHeight(Point_3& pntCal, const Point_3& pnt, double dDetalHeight);
protected:
	TerrianMesh* m_pTerrain;
	vector<vector<PolyPnt>> m_vRoadMiddleLine;
};

